﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers {
    import net.wooga.pets.events.*;
    import net.wooga.pets.models.world.vos.*;
    import net.wooga.pets.models.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;

    public class PreloadLevelupIconCommand extends Command {

		[Inject]
        public var userModel:UserModel;
		[Inject]
        public var levelModel:LevelModel;

        override public function execute():void{
            var _local1:int = (this.userModel.level + 1);
            var _local2:LevelVO = this.levelModel.getLevelDataByNumber(_local1);
            var _local3:RequestEvent = new RequestEvent(EventConstants.SEND_REQUEST);
            _local3.addAssetRequest(ProtocolConstants.LOAD_LEVELUP, _local2.graphicKey.toLowerCase(), ProtocolConstants.PRELOADING_PIPE);
            dispatch(_local3);
        }

    }
}//package net.wooga.pets.controllers 
